﻿#ifndef ADDRULEFORM_H
#define ADDRULEFORM_H

#include <QDialog>

namespace Ui {
class addRuleForm;
}

typedef struct Rule_t{
  uint16_t start_pos;
  uint16_t end_pos;
  QString field_name;
  QString field_type;
};

class addRuleForm : public QDialog
{
    Q_OBJECT

public:
    explicit addRuleForm(QDialog *parent = nullptr);
    ~addRuleForm();

    Rule_t getRule(bool *ok);

private slots:
    void on_pb_add_clicked();

    void on_pb_cancel_clicked();

private:
    Ui::addRuleForm *ui;
    bool ok_ = false;

    Rule_t rule_;
};

#endif // ADDRULEFORM_H
